<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>运算</title>
	</head>
	<body>
		<script type="text/javascript">
			var t=prompt("请输入第一个数：","");
			var t1=prompt("请输入第二个数：","");
			var t2=prompt("请输入一个运算符：","");
			var p1=parseInt(t);
			var p2=parseInt(t1);
			switch(t2){
				case "+":
				alert(p1+p2);
				break;
				case "-":
				alert(p1-p2);
				break;
				case "*":
				alert(t*t1);
				break;
				case" /":
				alert(p1/p2);
				break;
				default:
				alert(t2);
				break;
			}
		</script>
		
	</body>
</html>
